﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Bluyel.Core
{
    public class TypeEnumString : TypeEnumBasic, ITypeEnumString
    {
        //=====================================================================
        #region Constructor.

        //---------------------------------------------------------------------
        /// <summary>
        /// Constructor.
        /// Be carrefull to provide the typeBasic string for values.
        /// </summary>
        /// <param name="id"></param>
        /// <param name="name"></param>
        public TypeEnumString(UniqueId id, string name, ITypeBasic typeItem,TypeEnumSelectMode selectMode):base(id, name, typeItem, selectMode)
        {
        }
        #endregion

        //=====================================================================
        #region Properties.

        //---------------------------------------------------------------------
        public IEnumerable<ValueString> ListDValItems 
        {
            get 
            {
                List<ValueString> list = new List<ValueString>();
                foreach (IValue dval in ListItems)
                    list.Add(dval as ValueString);
                return list; 
            } 
        }

        //---------------------------------------------------------------------
        public List<string> ListValItems 
        {
            get
            {
                List<string> list = new List<string>();
                foreach (IValue dval in ListItems)
                    list.Add((dval as ValueString).GetValue());
                return list;
            }
        }

        #endregion
    }
}
